//
//  ExchangeRate.swift
//  LOTR Converter
//
//  Created by li on 2025/4/2.
//
import SwiftUI

struct ExchangeRate: View {
    let text : String
    let leftImg:ImageResource
    let rightImg:ImageResource
    var body: some View {
        HStack{
            //左
            Image(leftImg)
                .resizable()
                .scaledToFit()
                .frame(width: 33)
            //中
            Text(text)
            //右
            Image(rightImg)
                .resizable()
                .scaledToFit()
                .frame(width: 33)
        }
    }
}

#Preview{
    ExchangeRate(text: "1 金币=4 便士",leftImg: .goldpiece,rightImg: .goldpenny)
}
